import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;


public class MainForm extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public MainForm(){
		setupFrame();
		addMainPanel();
	}

	private void setupFrame() {
		Toolkit kit = Toolkit.getDefaultToolkit();
		Dimension screenSize = kit.getScreenSize();
		setTitle(Lang.get_AppTitle());
		setSize(screenSize.width/2, screenSize.height/2);
		setLocation(screenSize.width/4, screenSize.height/4);
		setResizable(true);
		setUndecorated(false);
		setIconImage(kit.getImage(Res.getAppIconFileName()));
		toFront();
	}

	private void addMainPanel() {
		add(new MainPanel(new ServiceManager()));
	}
}
